package com.chzc.initializer;


import com.chzc.util.DevilMessageEncoder;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;


public class DevilProducerInitializer extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        // 加入 自定义编码器
        pipeline.addLast(new DevilMessageEncoder());
    }
}
